import request from '@/utils/request'

//上传文件
export function upload(data) {
    return request({
      url: '/subsidy/file/upload',
      method: 'post',
      data: data
    })
}
  
//根据文件ossid查询文件
export function getFileByOssId(ossid) {
    return request({
      url: '/subsidy/file/download/' + ossid,
      method: 'get'
    })
  }

//删除文件
export function delFile(ossid) {
  return request({
    url: '/subsidy/file/' + ossid,
    method: 'delete'
  })
}

//电子印章
export function stamp(data){
  return request({
    url: '/subsidy/subsidyApplicationPlanting/applySeal',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'  // ✅ 关键：告诉后端这是 multipart
    }
  })
}